Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Merged
Contributor
Greptile OverviewGreptile SummaryFixed hanging tool calls by implementing proper integration tool handling in build mode. The change adds detection logic to distinguish integration tools from client tools, and introduces user-facing controls (Allow/Always Allow/Skip buttons) for integration tools that require server-side execution. The fix resolves the issue where integration tools would stay in pending state indefinitely without user interaction. Key changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ToolCall as ToolCall Component
participant Store as Copilot Store
participant Backend as API Backend
Note over ToolCall: Integration tool in pending state
User->>ToolCall: Click "Allow" or "Always Allow"
alt Always Allow clicked
ToolCall->>Store: addAutoAllowedTool(toolCall.name)
Store->>Backend: POST /api/copilot/auto-allowed-tools
Backend-->>Store: Updated autoAllowedTools list
end
ToolCall->>ToolCall: handleRun(toolCall, ...)
ToolCall->>ToolCall: isIntegrationTool(toolCall.name) = true
ToolCall->>Store: executeIntegrationTool(toolCall.id)
Store->>Store: Set state to 'executing'
Store->>Backend: POST /api/copilot/execute-tool
Note over Backend: Execute integration tool
Backend-->>Store: Tool execution result
Store->>Store: Set state to 'success' or 'error'
Store->>Backend: POST /api/copilot/tools/mark-complete
Note over Backend: Notify tool completion
Backend-->>Store: Acknowledgement
alt User clicks "Skip"
User->>ToolCall: Click "Skip"
ToolCall->>ToolCall: handleSkip(toolCall, ...)
ToolCall->>Store: setToolCallState(toolCall, 'rejected')
ToolCall->>Backend: POST /api/copilot/tools/mark-complete
Note over Backend: Mark as skipped (status 400)
end
|
| body: JSON.stringify({ | ||
| id: toolCall.id, | ||
| name: toolCall.name, | ||
| status: 400, |
Contributor
There was a problem hiding this comment.
style: status 400 typically indicates client error, but using 200 would be more semantically correct for a successful skip operation (the user request to skip was processed successfully)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx
Line: 328:328
Comment:
**style:** status 400 typically indicates client error, but using 200 would be more semantically correct for a successful skip operation (the user request to skip was processed successfully)
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes copilot hanging tool calls
Type of Change
Testing
Manual
Checklist